<form id="pagerForm" method="post" action="{:U($module_name.'/'.$action_name."?model=".$model)}">
    <input type="hidden" name="pageNum" value="{$pageNum}" />
    <input type="hidden" name="numPerPage" value="{$numPerPage}" />
    <input type="hidden" name="orderField" value="{$orderField}" />
    <input type="hidden" name="orderDirection" value="{$orderDirection}" />
</form>
<div class="pageHeader">
   
</div>
<div class="pageContent">
<div class="panelBar">
		<ul class="toolBar">
			<li>
				<a target="selectedTodo" rel="ids[]" href="{:U('Assetsreport/piechart',array('ftodo'=>'cz'))}"  class="add"><span>饼状图</span></a>
				<a target="selectedTodo" rel="ids[]" href="{:U('Assetsreport/barchart',array('ftodo'=>'cz'))}"  class="add"><span>柱状图</span></a>
				<a href="{:U('Assetsreport/piechart',array('todo'=>'$todo'))}" rel='piechart_cz' target="navTab" id="forstautss" style="display:none;">充值统计(图)</a>
			</li>
		</ul>
	</div>

<br /> 	
<table border="1"  >
 <tr height="40">
    <td rowspan="{$list.cz.total.count}" align="center" width="100" valign="middle">充值&nbsp;</td>
    <td align="center" valign="middle" width="60" >勾选</td>
	<td align="center" valign="middle" width="150">类型</td>
    <td align="center" valign="middle" width="80">科目</td>
    <td align="center" valign="middle" width="200">金额</td>
	<td align="center" valign="middle" width="200">操作</td>
	<td rowspan="{$list.cz.total.count}" width="200" align="center" valign="middle">总额：{$list.cz.total.CV} </td>
  </tr>
  <volist name="list.cz.data" id="cz">
 <tr height="50">
 	<td align="center" valign="middle"><input name="ids[]" class="chpro" value="{$cz['changtype']}|{$cz['subject']}" type="checkbox"></td>
    <td align="center" valign="middle">{$changtype[$cz['changtype']]}&nbsp;</td>
    <td align="center" valign="middle">{$cz.subject}&nbsp;</td>
    <td align="center" valign="middle">{$cz['value']}&nbsp;</td>  
	<td align="center" valign="middle"><a href="{:U('Money/assets',array('subject'=>$cz['subject'],'changtype'=>$cz['changtype']))}" target="navTab" rel=''>明细</a></td>  
  </tr>

  </volist>
</table>
<br />
<br />
<table   border="1"  >
 <tr height="40">
    <td rowspan="{$list.xfcz.total.count}" align="center" width="100" valign="middle">消费充值&nbsp;</td>
    <td align="center" valign="middle" width="60">勾选</td>
	<td align="center" valign="middle" width="150">类型</td>
    <td align="center" valign="middle" width="80">科目</td>
    <td align="center" valign="middle" width="200">金额</td>
	<td align="center" valign="middle" width="200">操作</td>
	<td rowspan="{$list.xfcz.total.count}" align="center" width="200" valign="middle">总额：{$list.xfcz.total.CV} </td>
  </tr>
  <volist name="list.xfcz.data" id="xfcz">
 <tr height="50">
 	<td align="center" valign="middle"><input name="ids[]" class="chpro" value="{if $xfcz['coupon']!=''}{$xfcz['coupon']}{else}{$xfcz['changtype']}|{$xfcz['subject']}{/if}" type="checkbox"></td>
    <td align="center" valign="middle">{$changtype[$xfcz['changtype']]}&nbsp;</td>
    <td align="center" valign="middle">{$xfcz.subject}&nbsp;</td>
    <td align="center" valign="middle">{$xfcz['value']}&nbsp;</td>  
	<td align="center" valign="middle"><a {if  $xfcz['coupon']} href="{:U('Money/coupon')}" {else} href="{:U('Money/assets',array('subject'=>$xfcz['subject'],'changtype'=>$xfcz['changtype']))}"{/if} target="navTab" rel=''>明细</a></td>  
  </tr>

  </volist>
</table>
	<br />
<br />
<table border="1"  >
 <tr height="40">
    <td rowspan="{$list.xf.total.count}" align="center" width="100" valign="middle">消费&nbsp;</td>
    <td align="center" valign="middle" width="60">勾选</td>
	<td align="center" valign="middle" width="150">类型</td>
    <td align="center" valign="middle" width="80">科目</td>
    <td align="center" valign="middle" width="200">金额</td>
	<td align="center" valign="middle" width="200">操作</td>
	<td rowspan="{$list.xf.total.count}" align="center" width="200" valign="middle">总额：{$list.xf.total.CV} </td>
  </tr>
  <volist name="list.xf.data" id="vo">
 <tr height="50">
 	<td align="center" valign="middle"><input name="ids[]" class="chpro" value="{if $vo['coupon']}{$vo['coupon']}{else}{$vo['changtype']}|{$vo['subject']}{/if}" type="checkbox"></td>
    <td align="center" valign="middle">{$changtype[$vo['changtype']]}&nbsp;</td>
    <td align="center" valign="middle">{$vo.subject}&nbsp;</td>
    <td align="center" valign="middle">{$vo['value']}&nbsp;</td>
	<td align="center" valign="middle"><a {if  $vo['coupon']} href="{:U('Money/coupon')}" {else} href="{:U('Money/assets',array('subject'=>$vo['subject'],'changtype'=>$vo['changtype']))}" {/if} target="navTab" rel=''>明细</a></td>    
  </tr>

  </volist>
</table>
</div>

<script>	
function ajaxTodo(url){
	$.ajax({
		type: 'POST',
		url: url,
		dataType: "json",
		cache: false,
		success: function(){ $("a", $(".j-num")).parent('.selected').children().click();return 0; },
		error: DWZ.ajaxError
	});
}

if(typeof('showFace')!="function"){
	var time = "";
		if($("#stime").val()!=""){
			 time += "&starttime="+$("#stime").val();
		}
		if($("#etime").val()!=""){
			 time += "&endtime="+$("#etime").val();
		}
function navTabAjaxDone(json){
    if (json.action == 'piechart'){	
		var todo = json.ftodo;
		var url = "{:U('Assetsreport/piechart',array('todo'=>'piechart'))}" + '&ids='+json.ids +'&ftodo='+json.ftodo+time;
		$("#forstautss").attr('href',url);
        $("#forstautss").click();
    }else if (json.action == 'barchart'){
		var todo = json.ftodo;
		var url = "{:U('Assetsreport/barchart',array('todo'=>'barchart'))}" + '&ids='+json.ids +'&ftodo='+json.ftodo+time;
		$("#forstautss").attr('href',url);
        $("#forstautss").click();
	}
	else {
		DWZ.ajaxDone(json);
		navTab.reload();
	}
}

}
</script>
